package pb;

import java.io.FileOutputStream;

import pb.Hello.HelloWorld;

public class ProtocolBufferWriteSample {
	public static void main(String[] args) throws Exception {
		HelloWorld test = test();
		FileOutputStream output = new FileOutputStream("d:/tmp/test.out");
		test.writeTo(output);
		output.close();
	}
	
	public static HelloWorld test() {
		HelloWorld.Builder builder = HelloWorld.newBuilder();
		builder.setMessage("test");
		
		return builder.build();
	}
}
